import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Sangre here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Sangre extends Actor
{
    /**
     * Act - do whatever the Sangre wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private int delay=0;
    private int sprite=1;
    public void act() 
    {
         this.animacion();
        if(sprite == 14 )
        {
        getWorld().removeObject(this);
       }
    }    
    public void animacion()
    {
        
        if(delay==4)
        {
            delay=0;
    
            setImage("sangre"+sprite+".png");
            getImage().scale(100,100);
            
            sprite++;
        }
        else
        delay++;
    }
}
